home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / pandawars.swf / scripts / frame_54 / PlaceObject2_160_233 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2007-03-20  |  792 b   |  34 lines

  1. onClipEvent(enterFrame){
  2.    timer += 1;
  3.    rot = this._rotation + 90;
  4.    this._x += Math.sin(rot * 3.141592653589793 / 180) * speed;
  5.    this._y -= Math.cos(rot * 3.141592653589793 / 180) * speed;
  6.    if(_root.yuka.jimen.hitTest(_X,_Y,true) || timer > 10)
  7.    {
  8.       this.removeMovieClip();
  9.    }
  10.    if(this.hitTest(_root.pandam.hit))
  11.    {
  12.       speed = 0;
  13.       _root.pandam.myColor.setRGB(16777062);
  14.       _root.pandam.hit.gotoAndPlay(2);
  15.       _root.pandam.life -= 8;
  16.       _root.lifeber._xscale -= 8;
  17.       this.removeMovieClip();
  18.    }
  19.    if(Key.isDown(65))
  20.    {
  21.       if(_root.yuka._x < 230)
  22.       {
  23.          this._x += _root.ido;
  24.       }
  25.    }
  26.    if(Key.isDown(68))
  27.    {
  28.       if(_root.yuka._x > -2830)
  29.       {
  30.          this._x -= _root.ido;
  31.       }
  32.    }
  33. }
  34.